package com.icebergteam.warfacewidget.ui;

import com.icebergteam.warfacewidget.core.LogManager;
import com.icebergteam.warfacewidget.news.ui.NewsActivity;
import android.os.Bundle;
import android.view.Window;
import android.widget.TextView;
import android.app.Activity;
import android.content.pm.PackageManager.NameNotFoundException;
import com.icebergteam.warfacewidget.R;


public class AboutActivity extends Activity {	
	public static final String className = NewsActivity.class.getCanonicalName();
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.requestWindowFeature(Window.FEATURE_NO_TITLE);
			
		setContentView(R.layout.activity_about);
		
		try {
			setVersionName();
		} catch (NameNotFoundException e) {
			LogManager.LogE(className, LogManager.getExecuteMethodName(), e.getMessage());
		}
	}
	
	private void setVersionName() throws NameNotFoundException {
		TextView versionTextView = (TextView)findViewById(R.id.about_version);
		versionTextView.setText(getString(R.string.about_version) + " " + getPackageManager().getPackageInfo(getPackageName(), 0).versionName);
	}
	
	@Override
	protected void onDestroy() {
		super.onDestroy();
	}
	
	
}
